home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1997 August
/
Walnut Creek CDROM.7z
/
LISTINGS
/
V_13_04
/
ALLISON.ZIP
/
USECMPLX.CPP
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1995-02-07
|
259 b
|
17 lines
LISTING 11 - Uses the complex number data type
#include <iostream.h>
#include "complex.h"
main()
{
complex c1(1,2), c2(3,4);
cout << c1 << " + " << c2 << " == " << c1+c2 << endl;
return 0;
}
// Output:
(1,2) + (3,4) == (4,6)